X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/6d26a6bd8b30ad893da0315655d2f68aee787515..68fb174e84f38b2d72c7a0325cbfc6dc4fe486cc:/scripts/EP1%2004.02%20Starting%20a%20Rocket_b.LACE?ds=inline diff --git a/scripts/EP1 04.02 Starting a Rocket_b.LACE b/scripts/EP1 04.02 Starting a Rocket_b.LACE new file mode 100644 index 0000000..85a5177 --- /dev/null +++ b/scripts/EP1 04.02 Starting a Rocket_b.LACE @@ -0,0 +1,44 @@ +# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. +# Approximation of acceleration with Taylor series +# Equation of motion +# r'' = (alpha / m0)*v0 + (alpha/m0)²*v0*t - gamma * ME / r² +# alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s +# m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg +# v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s +# gamma: gravitational constant: 6,6743E-11 m³/(kg*s²) +# ME: mass of earth: 5,97E+24 kg + +# include idivide +include CompoundFunctions.LACE + +coefficient.1(+1) -> alpha/m0*v0 +coefficient.2(+1) -> (alpha/m0)^2*v0 +coefficient.3 -> scale +coefficient.4(-1) -> -RE +coefficient.5(+1) -> 10*gamma*ME + +# generate t-ramp +iintegrate (-1) -> t + +# calculating altitude +iintegrate (alpha/m0*v0, (alpha/m0)^2*v0*t, -gamma*ME/r^2) -> -v # input is a ### 3. Term fehlen noch ### +cmultiply (scale, -v) -> -v.scaled +iintegrate (-v) -> r + IC: -RE + +# calculating acceleration +multiply (r,r) -> r^2 +idivide (10*gamma*ME, r^2) -> -10*gamma*ME/r^2 + +cmultiply ((alpha/m0)^2*v0, t) -> (alpha/m0)^2*v0*t + +# inverting velocity for display +invert (-v.scaled) -> v.scaled + +# subtracting the radius of earth in order to get altitude above ground for display +isum (-RE, r) -> -z +invert (-z) -> z + +output (t) -> out.x +output (v) -> out.y +output (z) -> out.z